<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>lib/timefmt.h</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.5.7' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<!-- beginning of fixed guide -->
<div id='guide'><ul>
<li><a href='#TOP'><img class='icon' src='../icons/first.png' alt='[^]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/last.png' alt='[v]' /></a></li>
<li><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a></li>
<li><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a></li>
<li><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a></li>
<li class='standout'><span><a href='../files/lib.html'>lib</a>/timefmt.h</span></li>
</ul></div>
<!-- end of fixed guide -->
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/lib.html'>lib</a>/timefmt.h</h2>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><img class='icon' src='../icons/n_top.png' alt='[top]' /><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+1 lib/timefmt.h'  /> */</em>
<hr />
<h2 class='header'><a href='../J/timefmt.h.html' title='Multiple included from 7 places.'>INCLUDED FROM</a></h2>
<hr />
<pre>
<a id='L1' name='L1'></a>   1 
<a id='L2' name='L2'></a>   2 <em class='comment'>/** \file timefmt.h</em>
<a id='L3' name='L3'></a>   3 <em class='comment'> *  \brief Header: time formating functions</em>
<a id='L4' name='L4'></a>   4 <em class='comment'> */</em>
<a id='L5' name='L5'></a>   5 
<a id='L6' name='L6'></a>   6 <em class='sharp'>#ifndef</em> <a href='../S/lib--timefmt.h.html#L7' title='Defined at 7 in lib/timefmt.h.'>MC__UTIL_TIMEFMT_H</a>
<a id='L7' name='L7'></a>   7 <em class='sharp'>#define</em> <a href='../S/lib--timefmt.h.html#L6' title='Referred from 6 in lib/timefmt.h.'>MC__UTIL_TIMEFMT_H</a>
<a id='L8' name='L8'></a>   8 
<a id='L9' name='L9'></a>   9 <em class='sharp'>#include</em> &lt;sys/time.h&gt;
<a id='L10' name='L10'></a>  10 <em class='sharp'>#include</em> &lt;sys/types.h&gt;
<a id='L11' name='L11'></a>  11 
<a id='L12' name='L12'></a>  12 <em class='comment'>/*** typedefs(not structures) and defined constants **********************************************/</em>
<a id='L13' name='L13'></a>  13 
<a id='L14' name='L14'></a>  14 <em class='sharp'>#define</em> <a href='../R/MAX_I18NTIMELENGTH.html' title='Multiple referred from 5 places.'>MAX_I18NTIMELENGTH</a> 20
<a id='L15' name='L15'></a>  15 <em class='sharp'>#define</em> <a href='../S/lib--timefmt.c.html#L116' title='Referred from 116 in lib/timefmt.c.'>MIN_I18NTIMELENGTH</a> 10
<a id='L16' name='L16'></a>  16 <em class='sharp'>#define</em> <a href='../S/lib--timefmt.c.html#L117' title='Referred from 117 in lib/timefmt.c.'>STD_I18NTIMELENGTH</a> 12
<a id='L17' name='L17'></a>  17 
<a id='L18' name='L18'></a>  18 <em class='sharp'>#define</em> <a href='../R/INVALID_TIME_TEXT.html' title='Multiple referred from 3 places.'>INVALID_TIME_TEXT</a> "(invalid)"
<a id='L19' name='L19'></a>  19 
<a id='L20' name='L20'></a>  20 <em class='comment'>/* safe localtime formatting - strftime()-using version */</em>
<a id='L21' name='L21'></a>  21 <em class='sharp'>#define</em> <a href='../R/FMT_LOCALTIME.html' title='Multiple referred from 3 places.'>FMT_LOCALTIME</a>(<a href='../Y/buffer.html' title='Multiple used in 1012 places.'>buffer</a>, <a href='../Y/bufsize.html' title='Multiple used in 37 places.'>bufsize</a>, <a href='../Y/fmt.html' title='Multiple used in 36 places.'>fmt</a>, <a href='../Y/when.html' title='Multiple used in 6 places.'>when</a>)               \
<a id='L22' name='L22'></a>  22     <em class='brace'>{</em>                                                           \
<a id='L23' name='L23'></a>  23         <strong class='reserved'>struct</strong> <a href='../Y/tm.html' title='Multiple used in 31 places.'>tm</a> *<a href='../Y/whentm.html' title='Multiple used in 4 places.'>whentm</a>;                                      \
<a id='L24' name='L24'></a>  24         <a href='../Y/whentm.html' title='Multiple used in 4 places.'>whentm</a> = <a href='../Y/localtime.html' title='Multiple used in 6 places.'>localtime</a>(&amp;<a href='../Y/when.html' title='Multiple used in 6 places.'>when</a>);                              \
<a id='L25' name='L25'></a>  25         <strong class='reserved'>if</strong> (<a href='../Y/whentm.html' title='Multiple used in 4 places.'>whentm</a> == <a href='../Y/NULL.html' title='Multiple used in 5646 places.'>NULL</a>)                                     \
<a id='L26' name='L26'></a>  26         <em class='brace'>{</em>                                                       \
<a id='L27' name='L27'></a>  27             <a href='../Y/strncpy.html' title='Multiple used in 8 places.'>strncpy</a>(<a href='../Y/buffer.html' title='Multiple used in 1012 places.'>buffer</a>, <a href='../S/lib--timefmt.h.html#L18' title='Defined at 18 in lib/timefmt.h.'>INVALID_TIME_TEXT</a>, <a href='../Y/bufsize.html' title='Multiple used in 37 places.'>bufsize</a>);        \
<a id='L28' name='L28'></a>  28             <a href='../Y/buffer.html' title='Multiple used in 1012 places.'>buffer</a>[<a href='../Y/bufsize.html' title='Multiple used in 37 places.'>bufsize</a>-1] = 0;                              \
<a id='L29' name='L29'></a>  29         <em class='brace'>}</em>                                                       \
<a id='L30' name='L30'></a>  30         <strong class='reserved'>else</strong>                                                    \
<a id='L31' name='L31'></a>  31         <em class='brace'>{</em>                                                       \
<a id='L32' name='L32'></a>  32             <a href='../Y/strftime.html' title='Multiple used in 5 places.'>strftime</a>(<a href='../Y/buffer.html' title='Multiple used in 1012 places.'>buffer</a>, <a href='../Y/bufsize.html' title='Multiple used in 37 places.'>bufsize</a>, <a href='../Y/fmt.html' title='Multiple used in 36 places.'>fmt</a>, <a href='../Y/whentm.html' title='Multiple used in 4 places.'>whentm</a>);             \
<a id='L33' name='L33'></a>  33         <em class='brace'>}</em>                                                       \
<a id='L34' name='L34'></a>  34     <em class='brace'>}</em>                                                           \
<a id='L35' name='L35'></a>  35 
<a id='L36' name='L36'></a>  36 <em class='sharp'>#define</em> <a href='../S/src--editor--edit.c.html#L3888' title='Referred from 3888 in src/editor/edit.c.'>FMT_LOCALTIME_CURRENT</a>(<a href='../Y/buffer.html' title='Multiple used in 1012 places.'>buffer</a>, <a href='../Y/bufsize.html' title='Multiple used in 37 places.'>bufsize</a>, <a href='../Y/fmt.html' title='Multiple used in 36 places.'>fmt</a>)             \
<a id='L37' name='L37'></a>  37     <em class='brace'>{</em>                                                           \
<a id='L38' name='L38'></a>  38         <a href='../Y/time_t.html' title='Multiple used in 133 places.'>time_t</a> <a href='../Y/__current_time.html' title='Multiple used in 3 places.'>__current_time</a>;                                  \
<a id='L39' name='L39'></a>  39         <a href='../Y/time.html' title='Multiple used in 23 places.'>time</a>(&amp;<a href='../Y/__current_time.html' title='Multiple used in 3 places.'>__current_time</a>);                                  \
<a id='L40' name='L40'></a>  40         <a href='../S/lib--timefmt.h.html#L21' title='Defined at 21 in lib/timefmt.h.'>FMT_LOCALTIME</a>(<a href='../Y/buffer.html' title='Multiple used in 1012 places.'>buffer</a>,<a href='../Y/bufsize.html' title='Multiple used in 37 places.'>bufsize</a>,<a href='../Y/fmt.html' title='Multiple used in 36 places.'>fmt</a>,<a href='../Y/__current_time.html' title='Multiple used in 3 places.'>__current_time</a>);       \
<a id='L41' name='L41'></a>  41     <em class='brace'>}</em>
<a id='L42' name='L42'></a>  42 
<a id='L43' name='L43'></a>  43 <em class='comment'>/*** enums ***************************************************************************************/</em>
<a id='L44' name='L44'></a>  44 
<a id='L45' name='L45'></a>  45 <em class='comment'>/*** structures declarations (and typedefs of structures)*****************************************/</em>
<a id='L46' name='L46'></a>  46 
<a id='L47' name='L47'></a>  47 <em class='comment'>/*** global variables defined in .c file *********************************************************/</em>
<a id='L48' name='L48'></a>  48 
<a id='L49' name='L49'></a>  49 <strong class='reserved'>extern</strong> <strong class='reserved'>char</strong> *<a href='../Y/user_recent_timeformat.html' title='Multiple used in 6 places.'>user_recent_timeformat</a>;    <em class='comment'>/* time format string for recent dates */</em>
<a id='L50' name='L50'></a>  50 <strong class='reserved'>extern</strong> <strong class='reserved'>char</strong> *<a href='../Y/user_old_timeformat.html' title='Multiple used in 6 places.'>user_old_timeformat</a>;       <em class='comment'>/* time format string for older dates */</em>
<a id='L51' name='L51'></a>  51 
<a id='L52' name='L52'></a>  52 <em class='comment'>/*** declarations of public functions ************************************************************/</em>
<a id='L53' name='L53'></a>  53 
<a id='L54' name='L54'></a>  54 <a href='../Y/size_t.html' title='Multiple used in 726 places.'>size_t</a> <a href='../S/lib--timefmt.c.html#L75' title='Defined at 75 in lib/timefmt.c.'>i18n_checktimelength</a> (<strong class='reserved'>void</strong>);
<a id='L55' name='L55'></a>  55 <strong class='reserved'>const</strong> <strong class='reserved'>char</strong> *<a href='../S/lib--timefmt.c.html#L128' title='Defined at 128 in lib/timefmt.c.'>file_date</a> (<a href='../Y/time_t.html' title='Multiple used in 133 places.'>time_t</a>);
<a id='L56' name='L56'></a>  56 
<a id='L57' name='L57'></a>  57 <em class='comment'>/*** inline functions ****************************************************************************/</em>
<a id='L58' name='L58'></a>  58 
<a id='L59' name='L59'></a>  59 <em class='sharp'>#endif</em> <em class='comment'>/* MC__UTIL_TIMEFMT_H */</em>
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a><img class='icon' src='../icons/n_bottom.png' alt='[bottom]' /><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+59 lib/timefmt.h'  /> */</em>
</body>
</html>
